﻿using System;
using DevExpress.XtraBars;
using UniMana.Data;

namespace UniMana.Win.Leadership
{
    public partial class FrmReportClass_Class_SubMajor : DevExpress.XtraEditors.XtraForm
    {
        public FrmReportClass_Class_SubMajor()
        {
            InitializeComponent();
            this.xucBar1.btnPrint_Click += 
                new UniMana.Utils.Controls.xucBar.ButtonClickHandler(this.btnPrint_Click);
        }
        private DBMain m_ReportClass_Major= new DBMain();
        private void ReportClass_Major_Load(object sender, EventArgs e)
        {
            grcClass_Major.DataSource = 
                m_ReportClass_Major.m_DCReadOnly.Training_Classes.GetReport_ClassByMajor(
                m_ReportClass_Major.m_DCReadOnly.Catalogue_Majors);
            cacClassMajor.DataSource = 
                m_ReportClass_Major.m_DCReadOnly.Training_Classes.GetReport_ClassByMajor(
                m_ReportClass_Major.m_DCReadOnly.Catalogue_Majors);
            cacClassMajor.Series[0].ArgumentDataMember = "Name";
            cacClassMajor.Series[0].TopNOptions.Enabled = true;
            cacClassMajor.Series[0].ArgumentDataMember = "Name";
            cacClassMajor.Series[0].Name = "Ngành Học";
            cacClassMajor.Series[0].TopNOptions.Enabled = true;
            cacClassMajor.Series[0].ValueDataMembersSerializable = "Total";
        }
        private void btnPrint_Click(object sender, ItemClickEventArgs e)
        {
            compositeLink_HienThi.ShowPreviewDialog();
        }
    }
}